import storage from '@system.storage';
export default {
    data: {
        title: 'World'
    },
    get(){
        storage.get({
            key: 'storage_key',
            success: function(data) {
                console.log('call storage.get success: ' + data);
            },
            fail: function(data, code) {
                console.log('call storage.get fail, code: ' + code + ', data: ' + data);
            },
            complete: function() {
                console.log('call complete');
            },
        });
    },
    set(){
        storage.set({
            key: 'storage_key',
            value: 'storage value',
            success: function() {
                console.log('call storage.set success.');
            },
            fail: function(data, code) {
                console.log('call storage.set fail, code: ' + code + ', data: ' + data);
            },
        });
    },
    clear(){
        storage.clear({
            success: function() {
                console.log('call storage.clear success.');
            },
            fail: function(data, code) {
                console.log('call storage.clear fail, code: ' + code + ', data: ' + data);
            },
        });
    },
    delete(){
        storage.delete({
            key: 'storage_key',
            success: function() {
                console.log('call storage.delete success.');
            },
            fail: function(data, code) {
                console.log('call storage.delete fail, code: ' + code + ', data: ' + data);
            },
        });
    }
}
